#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtBluetooth/QBluetoothDeviceDiscoveryAgent>//扫描蓝牙设备
#include <QtBluetooth/QBluetoothDeviceInfo>
#include <QListWidgetItem>
#include <QDebug>
#include <QtBluetooth/QBluetoothSocket>
#include <QtBluetooth/QBluetoothAddress>
#include <QtBluetooth/QBluetoothUuid>
#include <QMessageBox>
#include <QTimer>
#include <QElapsedTimer>
#include <QApplication>
#include <QProcess>
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>
#include<opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/imgproc/imgproc.hpp>
#include<QString>
#include<QFileDialog>
#include<QLabel>
#include<QGraphicsScene>
#include<QGraphicsView>
#include <QTimer>
using namespace cv;


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
   // void on_pushButton_3_clicked();
    void addDeviceToList(const QBluetoothDeviceInfo &device);//将发现的设备列表添加进列表中
    void startSearch();//启动蓝牙搜索
    void TS();//提示
    void connectToSelectedDevice(QListWidgetItem *item);//连接蓝牙设备
    void updateFrame();//摄像头开启

    void on_pushButton_6_pressed();

    void on_pushButton_8_pressed();

    void on_pushButton_7_pressed();

    void on_pushButton_9_pressed();

    void on_pushButton_10_pressed();

    void on_pushButton_12_pressed();

    void on_pushButton_13_pressed();

    void on_pushButton_14_pressed();

    void on_pushButton_15_pressed();

    void on_pushButton_16_pressed();

    void on_pushButton_17_pressed();

    void on_pushButton_18_pressed();

private:
    Ui::MainWindow *ui;
    QBluetoothDeviceDiscoveryAgent *discoveryAgent;
    QList<QBluetoothDeviceInfo> deviceList;
    QBluetoothSocket *socket;
    cv::VideoCapture cap;
    QTimer timer;
    Mat image;

};
#endif // MAINWINDOW_H
